﻿Imports System
Imports System.Collections
Imports System.Collections.Generic

Partial Public Class Helper
    ''' <summary>
    ''' Convert Generic List to an ArrayList
    ''' </summary>
    ''' <param name="list"></param>
    ''' <returns></returns>
    Public Function ToArrayList(ByVal list As IList) As ArrayList
        Dim GenericList As List(Of [Object]) = ToListOf(Of [Object])(list)
        Return If((list Is Nothing), Nothing, New ArrayList(GenericList.ToArray()))
    End Function
End Class